package com.wandian.util
{
	import flash.display.MovieClip;
	import flash.display.Sprite;

	/**
	 * mc帮助类
	 * @author long
	 */
	public class MCUtil
	{
		public function MCUtil()
		{
		}

		public static function stopMcAllChild(parentMc:*):void
		{
			var num:int=0;
			var childMc:MovieClip=null;
			if (parentMc as Sprite == null)
			{
			}
			if (parentMc as MovieClip != null)
			{
				num=0;
				while (num < parentMc.numChildren)
				{

					childMc=parentMc.getChildAt(num) as MovieClip;
					if (childMc != null)
					{
						childMc.stop();
						stopMcAllChild(childMc);
					}
					else if (parentMc.getChildAt(num) as Sprite)
					{
						stopMcAllChild(parentMc.getChildAt(num));
					}
					num=num + 1;
				}
			}
			return;
		} 
	}
}
